package com.borrower.dao;


import com.borrower.dto.BorrowInfoBean;
import com.pojo.BookDamageBean;
import com.pojo.BorrowerBean;
import com.pojo.QueryBookBean;
import com.pojo.UserSendMsgBean;

import javax.servlet.http.HttpServletRequest;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface BorrowerDao {

    boolean Regis(String sql, Connection conn, BorrowerBean bor) throws SQLException;

    //判断注册时用户名是否存在
    boolean RegisName(String sql, Connection conn, BorrowerBean bor) throws SQLException;

    boolean Login(String sql, Connection conn, BorrowerBean bor) throws SQLException;

    //显示全部借书信息列表
    List<BorrowInfoBean> BorrowInfo( String sql, Connection conn,String loginName) throws SQLException;

    /**
     * 留言：userid，msg，时间
     * @param sql
     * @param conn
     * @param userSendMsgBean
     * @return
     * @throws SQLException
     */
    boolean SendMsgDao(String sql, Connection conn, UserSendMsgBean userSendMsgBean) throws SQLException;





    List<BorrowerBean> getBorInfoByIdCard(BorrowerBean bb, Connection conn, String sql) throws SQLException;

    //根据书名查询借阅信息
    List<QueryBookBean> getBookInfoByName(String bookName, Connection conn, String sql) throws SQLException ;

    //用户注销界面显示用户个人信息
    List<BorrowerBean> UserInfo(String sql, Connection conn,String loginName) throws SQLException;

    //将用户注销状态设置为1
    boolean Cancel(String sql, Connection conn,BorrowerBean bor, String loginName) throws SQLException;



    //提交书籍报损信息
    boolean BookDamageInfo(String sql, Connection conn, BookDamageBean bor) throws SQLException;

}
